package com.teaphy.coroutinecrawler.flow.operators.transform

import kotlinx.coroutines.*
import kotlinx.coroutines.flow.*

fun main() = runBlocking {
    val flow = flowOf(1, 2, 3)
        .onEach { delay(10) }
    val flow2 = flowOf("a", "b", "c", "d")
        .onEach { delay(15) }
    flow.zip(flow2) { i, s -> i.toString() + s }
        .collect {
            println(it)
        }
    println("Done")
}